package entity;

import java.util.Date;

public class Borrow {
    private int id;                  // 借阅记录ID
    private String name;             // 书本名
    private Date borrowDate;         // 借阅日期
    private Date returnDate;         // 归还日期
    private int borrower;            // 借阅者ID，外键引用Reader表的id
    private String borrowerPhone;    // 借阅者电话
    private String borrowerEmail;    // 借阅者邮箱

    // 默认构造方法
    public Borrow() {}

    // 带参数的构造方法
    public Borrow(int id, String name, Date borrowDate, Date returnDate, int borrower, String borrowerPhone, String borrowerEmail) {
        this.id = id;
        this.name = name;
        this.borrowDate = borrowDate;
        this.returnDate = returnDate;
        this.borrower = borrower;
        this.borrowerPhone = borrowerPhone;
        this.borrowerEmail = borrowerEmail;
    }

    // Getter 和 Setter 方法

    // 获取借阅记录ID
    public int getId() {
        return id;
    }

    // 设置借阅记录ID
    public void setId(int id) {
        this.id = id;
    }

    // 获取书本名
    public String getName() {
        return name;
    }

    // 设置书本名
    public void setName(String name) {
        this.name = name;
    }

    // 获取借阅日期
    public Date getBorrowDate() {
        return borrowDate;
    }

    // 设置借阅日期
    public void setBorrowDate(Date borrowDate) {
        this.borrowDate = borrowDate;
    }

    // 获取归还日期
    public Date getReturnDate() {
        return returnDate;
    }

    // 设置归还日期
    public void setReturnDate(Date returnDate) {
        this.returnDate = returnDate;
    }

    // 获取借阅者ID
    public int getBorrower() {
        return borrower;
    }

    // 设置借阅者ID
    public void setBorrower(int borrower) {
        this.borrower = borrower;
    }

    // 获取借阅者电话
    public String getBorrowerPhone() {
        return borrowerPhone;
    }

    // 设置借阅者电话
    public void setBorrowerPhone(String borrowerPhone) {
        this.borrowerPhone = borrowerPhone;
    }

    // 获取借阅者邮箱
    public String getBorrowerEmail() {
        return borrowerEmail;
    }

    // 设置借阅者邮箱
    public void setBorrowerEmail(String borrowerEmail) {
        this.borrowerEmail = borrowerEmail;
    }

}
